package com.ruoyi.system.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 短信下发计划对象 rnx_sms_send_plan
 * 
 * @author yangtaoer
 * @date 2022-05-13
 */
public class RnxSmsSendPlan extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;

    /** 下发日志id */
    private String smsLogId;

    /** 手机号 */
    @Excel(name = "手机号")
    private String phone;

    /** 模板编码 */
    @Excel(name = "模板编码")
    private String templateCode;

    /** 参数 */
    @Excel(name = "参数")
    private String param;

    /** 下发时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "下发时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date sendDate;

    /** 下发详细时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "下发详细时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date sendTime;

    /** 状态 */
    @Excel(name = "状态")
    private Long state;

    /** 失败原因 */
    @Excel(name = "失败原因")
    private String errorDesc;

    /** 扩展字段 */
    @Excel(name = "接收人")
    private String ext;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setSmsLogId(String smsLogId) 
    {
        this.smsLogId = smsLogId;
    }

    public String getSmsLogId() 
    {
        return smsLogId;
    }
    public void setPhone(String phone) 
    {
        this.phone = phone;
    }

    public String getPhone() 
    {
        return phone;
    }
    public void setTemplateCode(String templateCode) 
    {
        this.templateCode = templateCode;
    }

    public String getTemplateCode() 
    {
        return templateCode;
    }
    public void setParam(String param) 
    {
        this.param = param;
    }

    public String getParam() 
    {
        return param;
    }
    public void setSendDate(Date sendDate) 
    {
        this.sendDate = sendDate;
    }

    public Date getSendDate() 
    {
        return sendDate;
    }
    public void setSendTime(Date sendTime) 
    {
        this.sendTime = sendTime;
    }

    public Date getSendTime() 
    {
        return sendTime;
    }
    public void setState(Long state) 
    {
        this.state = state;
    }

    public Long getState() 
    {
        return state;
    }
    public void setErrorDesc(String errorDesc) 
    {
        this.errorDesc = errorDesc;
    }

    public String getErrorDesc() 
    {
        return errorDesc;
    }
    public void setExt(String ext) 
    {
        this.ext = ext;
    }

    public String getExt() 
    {
        return ext;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("smsLogId", getSmsLogId())
            .append("phone", getPhone())
            .append("templateCode", getTemplateCode())
            .append("param", getParam())
            .append("sendDate", getSendDate())
            .append("sendTime", getSendTime())
            .append("state", getState())
            .append("errorDesc", getErrorDesc())
            .append("ext", getExt())
            .toString();
    }
}
